package com.woniuxy.woniuhis.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.woniuxy.woniuhis.entity.Pharmacy;
import com.woniuxy.woniuhis.exception.AllotException;
import com.woniuxy.woniuhis.mapper.PharmacyMapper;
import com.woniuxy.woniuhis.service.PharmacyService;

@Service
public class PharmacyServiceImpl implements PharmacyService{

	@Autowired
	PharmacyMapper pharmacyMapper;
	
	
	@Override
	public Pharmacy findPharmacy(Pharmacy pharmacy) {
		
		try {
			
			Pharmacy realpharmacy = pharmacyMapper.selectPharmacyByPharmacyId(pharmacy);
			
			return realpharmacy;
			
		} catch (Exception e) {
			
			System.out.println("findPharmacy错误");
			e.printStackTrace();
			throw new AllotException("findPharmacy错误");
			
		}

		
	}

	
	
}
